//
//  SASalesOrderStatementErrorCell.m
//  Saas
//
//  Created by bing on 2020/7/30.
//  Copyright © 2020 bing. All rights reserved.
//

#import "SASalesOrderStatementErrorCell.h"

@interface SASalesOrderStatementErrorCell()

@property (nonatomic,weak) UILabel *nameLabel;


@end
@implementation SASalesOrderStatementErrorCell

+(instancetype)cellForTableView:(UITableView*)tableView
{
    static NSString *ID = @"SASalesOrderStatementErrorCell";
    id cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[self alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleDefault;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        // 添加所有子控件
        [self setUpAllChildView];
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}

-(void)setUpAllChildView
{
    UILabel *nameLabel = [[UILabel alloc] initWithFrame:SARectMake(0, 0, 300, 15)];
    nameLabel.textAlignment = NSTextAlignmentCenter;
    nameLabel.textColor = kColor(102, 102, 102, 1);
    nameLabel.font = kFont(14);
    [self.contentView addSubview:nameLabel];
    self.nameLabel = nameLabel;
}

-(void)loadData:(SASalesOrderStatementErrorSkuList *)model
{
    self.nameLabel.text = [NSString stringWithFormat:@"%@,%@,%@,%@",model.productCode,model.productName,model.colourName,model.sizeName];
}

@end
